#include "../matrix.h"

int main(int argc, char *argv[])
{
  TMatrix<int> *m4 = new TMatrix<int>(3, 4, 7);
  int a[] = {1, 2 , 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
  TMatrix<int> *m5 = new TMatrix<int>(3, 4, a);
  TMatrix<int> *m3 = new TMatrix<int>(*m4);
  TMatrix<int> m2 = *m5;
  m2.print();
  m3->print();
  m5->print();
  std::cout << "rows: " <<  m4->nrows();
  std::cout << "\ncols: " << m4->ncols() << std::endl;
  m4->print();

  
  for (int k = 0; k < 3; k++)
    for (int l = 0; l < 4; l++)
      (*m4)[k][l] = 1;
  m4->print();

  m4->resize(4, 3);
  for (int k = 0; k < 4; k++)
    for (int l = 0; l < 3; l++)
      (*m4)[k][l] = 3;

  m4->print();

  m4->assign(5, 3, 8);
  m4->print();

  delete m5;  
  delete m4;
  return 0;
}
